# $Id: PKGBUILD 148675 2012-02-05 11:46:31Z ibiru $
# Maintainer: Jan de Groot <jan@archlinux.org>

pkgname=at-spi
pkgver=1.32.0
pkgrel=5
pkgdesc="Assistive Technology Service Provider Interface"
arch=('i686' 'x86_64')
license=('GPL')
depends=('libbonobo' 'libxtst' 'gtk2' 'gconf')
makedepends=('pkgconfig' 'python2' 'intltool' 'libice' 'libsm')
options=('!libtool' '!emptydirs')
url="http://www.gnome.org"
install=at-spi.install
source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/1.32/${pkgname}-${pkgver}.tar.bz2)
sha256sums=('cc841dea746413eebadf0710dabec741450b37a06821c34526f505fe9d027039')

# !! make sure you 'pacman -Rsc python' from your chroot before building the package or it would use python3 instead of the wanted python2 !!

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix=/usr --sysconfdir=/etc \
      --localstatedir=/var --disable-static \
      --libexecdir=/usr/lib/at-spi \
      --enable-relocate
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install

  install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
  gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain at-spi "${pkgdir}"/etc/gconf/schemas/*.schemas
  rm -f "${pkgdir}"/etc/gconf/schemas/*.schemas
}
